﻿using System;
using System.Windows;

namespace WorkoutDictionary.View
{
    public partial class MainPage
    {
        // Constructor
        public MainPage()
        {
            InitializeComponent();

            //var dataitems = new List<test>
            //                    {
            //                        new test {Date = DateTime.Now.ToString("MM/dd/yyyy h:mm tt"), Type = "OneTwoThree"},
            //                        new test {Date = DateTime.Now.ToString("MM/dd/yyyy h:mm tt"), Type = "OneTwoThree"},
            //                        new test {Date = DateTime.Now.ToString("MM/dd/yyyy h:mm tt"), Type = "OneTwoThree"},
            //                        new test {Date = DateTime.Now.ToString("MM/dd/yyyy h:mm tt"), Type = "OneTwoThree"},
            //                        new test {Date = DateTime.Now.ToString("MM/dd/yyyy h:mm tt"), Type = "OneTwoThree"},
            //                        new test {Date = DateTime.Now.ToString("MM/dd/yyyy h:mm tt"), Type = "OneTwoThree"},
            //                        new test {Date = DateTime.Now.ToString("MM/dd/yyyy h:mm tt"), Type = "OneTwoThree"},
            //                        new test {Date = DateTime.Now.ToString("MM/dd/yyyy h:mm tt"), Type = "OneTwoThree"},
            //                        new test {Date = DateTime.Now.ToString("MM/dd/yyyy h:mm tt"), Type = "OneTwoThree"},
            //                        new test {Date = DateTime.Now.ToString("MM/dd/yyyy h:mm tt"), Type = "OneTwoThree"},
            //                        new test {Date = DateTime.Now.ToString("MM/dd/yyyy h:mm tt"), Type = "OneTwoThree"},
            //                        new test {Date = DateTime.Now.ToString("MM/dd/yyyy h:mm tt"), Type = "OneTwoThree"},
            //                        new test {Date = DateTime.Now.ToString("MM/dd/yyyy h:mm tt"), Type = "OneTwoThree"},
            //                        new test {Date = DateTime.Now.ToString("MM/dd/yyyy h:mm tt"), Type = "OneTwoThree"},
            //                        new test {Date = DateTime.Now.ToString("MM/dd/yyyy h:mm tt"), Type = "OneTwoThree"},
            //                        new test {Date = DateTime.Now.ToString("MM/dd/yyyy h:mm tt"), Type = "OneTwoThree"},
            //                        new test {Date = DateTime.Now.ToString("MM/dd/yyyy h:mm tt"), Type = "OneTwoThree"},
            //                        new test {Date = DateTime.Now.ToString("MM/dd/yyyy h:mm tt"), Type = "OneTwoThree"},
            //                        new test {Date = DateTime.Now.ToString("MM/dd/yyyy h:mm tt"), Type = "OneTwoThree"},
            //                        new test {Date = DateTime.Now.ToString("MM/dd/yyyy h:mm tt"), Type = "OneTwoThree"},
            //                        new test {Date = DateTime.Now.ToString("MM/dd/yyyy h:mm tt"), Type = "OneTwoThree"},
            //                        new test {Date = DateTime.Now.ToString("MM/dd/yyyy h:mm tt"), Type = "OneTwoThree"},
            //                        new test {Date = DateTime.Now.ToString("MM/dd/yyyy h:mm tt"), Type = "OneTwoThree"},
            //                        new test {Date = DateTime.Now.ToString("MM/dd/yyyy h:mm tt"), Type = "OneTwoThree"},
            //                        new test {Date = DateTime.Now.ToString("MM/dd/yyyy h:mm tt"), Type = "OneTwoThree"},
            //                        new test {Date = DateTime.Now.ToString("MM/dd/yyyy h:mm tt"), Type = "OneTwoThree"},
            //                        new test {Date = DateTime.Now.ToString("MM/dd/yyyy h:mm tt"), Type = "OneTwoThree"},
            //                        new test {Date = DateTime.Now.ToString("MM/dd/yyyy h:mm tt"), Type = "OneTwoThree"},
            //                        new test {Date = DateTime.Now.ToString("MM/dd/yyyy h:mm tt"), Type = "OneTwoThree"}
            //                    };

            //this.ListBoxWorkouts.ItemsSource = dataitems;
        }

        private void PhoneApplicationPageLoaded(object sender, RoutedEventArgs e)
        {
            var workouts = ((App) Application.Current).StorageManager.GetWorkoutsViewModels();
            this.ListBoxWorkouts.ItemsSource = workouts;
        }

        private void ApplicationBarIconButtonClick(object sender, EventArgs e)
        {
            var uri = new Uri("/View/WorkoutAdd.xaml", UriKind.Relative);
            NavigationService.Navigate(uri);
        }
    }
}